package com.林子祺.CAT旅游系统.controller.login;

import com.林子祺.CAT旅游系统.dao.login.AccountComfirm;
import com.林子祺.CAT旅游系统.entity.login.LoginStatus;
import com.林子祺.CAT旅游系统.view.login.Login;
import com.林子祺.CAT旅游系统.view.Menu;
import com.林子祺.CAT旅游系统.view.login.LoginFailed;

import java.awt.*;


public class MenuLogin {

    public static void login(){

        try {
            Login.login();
        } catch (AWTException e) {
            e.printStackTrace();
        }

    }

    public static void process(){
        AccountComfirm.checkAccount(LoginStatus.nameConfirm, LoginStatus.passwordConfirm);
        if(LoginStatus.loginY_N == true) {
            try {
                Menu.menu();
            } catch (AWTException e) {
                e.printStackTrace();
            }
        }
        else
        {
            LoginFailed.logFail();
        }
    }

}
